package com.guigu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guigu.mapper.CityMapper;
import com.guigu.pojo.City;
import com.guigu.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CityServiceimpl extends ServiceImpl<CityMapper, City> implements CityService {
    @Autowired
    CityMapper cityMapper;

    @Override
    public List queryByPid(Integer id) {
        QueryWrapper queryWrapper=new QueryWrapper();
        queryWrapper.eq("p_id",id);
        return this.list(queryWrapper);
    }
}
